﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CPPEI.Coolzon.Designer.Event.UI
{
    /// <summary>
    /// 选中一个组件实例对象的事件
    /// </summary>
    public class UISelectPartInstanceEvent : UIEvent
    {
        public string SceneName { get; set; }
        public string PartType { get; set; }
        public string PartInstanceName { get; set; }
        public object PartInstance { get; set; }

        /// <summary>
        /// 组件类型
        /// partType通过MetadataUtil.GetTypeString来获取
        /// </summary>
        /// <param name="sceneName">场景名称</param>
        /// <param name="partType">组件类型</param>
        /// <param name="partInstanceName">组件名称</param>
        public UISelectPartInstanceEvent(string sceneName, string partType, string partInstanceName,
            object partInstance)
        {
            this.SceneName = sceneName;
            this.PartType = partType;
            this.PartInstanceName = partInstanceName;
            this.PartInstance = partInstance;
        }
    }
}
